"""CherryBank, a CherryPy application."""
__author__ = 'Ong Zhi Xian'

#--------------------------------------------------------------------------------
import os
import socket
import cherrypy
from tools import authenticate
from webpages import *
from webpages.admin import *
from webpages.admin.tools import *


################################################################################



################################################################################



# For CherryBank Simple Banking
from webpages.bank import *
root = home
root.account = account
root.balance = balance


# For CherryBank Financials
root.portfolio = portfolio
#root = home

# For CherryBank Inventory

# For CherryBank Setup Functions
root.admin = home
root.admin.tools = tools
root.admin.tools.keygen = keygen
#root.admin = admin
#root.admin.tools = tools

# For CherryBank login/logout
root.login = login
root.logout = logout


################################################################################
#Run server
# Use the below during development to simulate application as sub-tree on web server
#Note: The value for script_name MUST NOT end in a slash.
app = cherrypy.quickstart(root, '/cherrybank', config='site.conf')
# Use the below on production machine
#app = cherrypy.quickstart(root, config='site.conf')

